]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
windowManager: Avoid reentrancy on the ::size-changed handler
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 25 Jan 2017 16:47:18 +0000 (17:47 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 26 Jan 2017 16:51:39 +0000 (17:51 +0100)
We have no guarantees on the number of ::size-changed signals that we may
receive, so the _sizeChangedWindow handler may run multiple times, which
leads to multiple calls to meta_plugin_size_change_completed(). So double
check the actor is not already being animated in the _sizeChangedWindow
handler to avoid reentrancy.

https://bugzilla.gnome.org/show_bug.cgi?id=777784

js/ui/windowManager.js

index eb7716a0d52cc1c17ec345b9b9935c87b426ee03..551c3358cc9fc30e5aee5e476fdaf47b45510434 100644 (file)
@@ -1286,6 +1286,8 @@ const WindowManager = new Lang.Class({
     _sizeChangedWindow: function(shellwm, actor) {
         if (!actor.__fullscreenInfo)
             return;
+        if (this._resizing.indexOf(actor) != -1)
+            return;
 
         let actorClone = actor.__fullscreenInfo.clone;
         let targetRect = actor.meta_window.get_frame_rect();